﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;

namespace XRpgLibrary.TileEngine
{
    public class Tile
    {
        #region Field Region
            
        int tileIndex;
        
        #endregion
            
        #region Property Region
            
        public virtual int TileIndex
        {
            get 
            { 
                return tileIndex; 
            }
            set
            { 
                tileIndex = value; 
            }
        }
            
        #endregion
            
        #region Constructor Region
            
        public Tile(int tileIndex)
        {
            TileIndex = tileIndex;
        }
        
        #endregion

        public static bool operator ==(Tile tile, Tile other)
        {
            return tile.TileIndex == other.TileIndex;
        }

        public static bool operator !=(Tile tile, Tile other)
        {
            return tile.TileIndex != other.TileIndex;
        }

        public Tile Clone()
        {
            return new Tile(this.TileIndex);
        }

        public override string ToString()
        {
            return TileIndex.ToString();
        }
    }
}
